<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% //接收数据,验证身份,并返回页面
     request.setCharacterEncoding("utf-8");
     String cooker_id= request.getParameter("cooker_id");
     String password = request.getParameter("password");
     
     boolean ret = false;
     
     javax.sql.rowset.WebRowSet rs = aa.db.DBTools.getRS("SELECT * FROM cooker where cooker_id='"+cooker_id+"'");
     
     if(rs.next()){
    	 String rspwd = rs.getString("password");
    	 if(rspwd.equals(password)){
    		 //验证通过
        	 ret = true;
    		 
    	//写session,usserid
    	
       	 
         	session.setAttribute("cooker_id",rs.getString("cooker_id"));
    	    	
    	 }
     }
   if(ret){
	 //验证通过
  	 
   	System.out.println("ok"); 
   	response.sendRedirect("kitchen.jsp");
    	
    }else{
    	 
    	 //密码错误
    	 System.out.println("False"); 
    	 
     
    response.sendRedirect("cooker.jsp");
     }
     
    %>